package 面向对象.课堂练习.编程题;

import java.io.Serializable;

/**
 * @author IT_Jay
 * @date 2022/1/9 9:43 AM
 */
interface Processable{
    String print();
}

public class Seaweed extends Capture implements Processable, Serializable {
    public float weight;
    public String color;
    public float getWeight(){
        return weight;
    }
    public void setWeight(float weight){
        this.weight=weight;
    }
    public String getColor(){
        return color;
    }
    public void setColor(String color){
        this.color=color;
    }
    @Override
    public String print(){
        return super.toString()+"\tweight:"+weight+"\tcolor:"+color;
    }
}
class TestSeaweed{
    public static void main(String[] args){
        Seaweed s = new Seaweed();
        s.setName("赤藻");
        s.setCatalog("藻类");
        s.setWeight(3.14f);
        s.setColor("yellow");
        System.out.println(s.print());
    }
}